<?php
error_reporting(E_ALL);

function print_menu($name, $icon, $r)
{
	global $rubrique;
	global $page;
	echo '
	<li>
		<a href="?p='.$page.'&amp;r='.$r.'"';
		if ($rubrique == $r) {
			echo ' class="active"';
		}
	echo ' style="background: url(\'images/icons/'.$icon.'\') no-repeat 16px center; text-indent: 20px;">
	'.$name.'</a>
	</li>';
}

?>
<ul class="sideNav">
<?php
switch($page) {
	case 'club':
		print_menu('Agenda', 'book.png', 'agenda');
		print_menu('Gymnases', 'building.png', 'gym_list');
		print_menu('Tarifs', 'money_euro.png', 'tariffs');
		print_menu('Horaires', 'time.png', 'hours');
		print_menu('Événements', 'calendar.png', 'events');
		print_menu('Saisons', 'date.png', 'seasons');
		print_menu('Liens', 'link.png', 'links');
		break;

	case 'adherents':
		print_menu('Adhérents', 'group.png', 'adherents');
		print_menu('Inscriptions en attente', 'clock.png', 'inscriptions');
		print_menu('Inscriptions annulées', 'cancel.png', 'canceled');
		print_menu('Anciens membres', 'user_gray.png', 'old_members');
		print_menu('Demandes créneaux', 'application_view_tile.png', 'creneaux');
		print_menu('Exporter', 'page_white_excel.png', 'exporter');
		print_menu('Recherche avancée', 'find.png', 'recherche');
		print_menu('Statistiques', 'chart_bar.png', 'statistiques');
		break;

	case 'redaction':
		print_menu('Gestion contenus', 'page.png', 'contenus_gestion');
		print_menu('Ajouter contenus', 'content_add.png', 'contenus_ajouter');
		print_menu('Gérer les news', 'page_white_stack.png', 'news_gestion');
		print_menu('Écrire une news', 'page_white_add.png', 'news_edit');
		print_menu('Gestion du forum', 'table.png', 'annonces');
		print_menu('Envoyer mail groupé', 'email.png', 'mailgroup_envoyer');
		break;

	case 'menus':
		print_menu('Gestion menus', 'page_white_gear.png', 'menus');
		print_menu('Ajouter menus', 'add.png', 'menus_ajouter');
		print_menu('Supprimer menus', 'delete.png', 'menus_supprimer');
		print_menu('Regénérer sitemap', 'arrow_rotate_anticlockwise.png', 'menus_generer');
		break;

	case 'media':
		print_menu('Galeries photo', 'photos.png', 'photo_gallery_index');
		print_menu('Liste des vidéos', 'film.png', 'gerer_videos');
		print_menu('Ajouter une vidéo', 'film_add.png', 'edit_video');
		break;

	case 'admin':
		print_menu('Tutoriel', 'mouse.png', 'tuto');
		print_menu('Administrateurs', 'user_suit.png', 'admins');
		print_menu('Paramètres', 'bricks.png', 'param');
		print_menu('Connexions', 'connect.png', 'connections');
		print_menu('Fichier de log', 'database_save.png', 'log');
		break;
}
?>
</ul>
